package com.fund.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum AgeGroup implements BaseEnum {
    UNDER_30(1, "30岁以下"),
    BETWEEN_30_40(2, "30-40岁"),
    BETWEEN_40_50(3, "40-50岁"),
    BETWEEN_50_60(4, "50-60岁"),
    OVER_60(5, "60岁以上");

    @EnumValue
    @JsonValue
    private final Integer value;  // 存储数字编码（如 "1", "2"）
    private final String desc;  // 存储描述文本（如 "30岁以下"）

    AgeGroup(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }
}
